import com.sun.xml.internal.ws.policy.privateutil.PolicyUtils;

import java.io.*;
import java.util.Scanner;

public class handleSmalNum {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String name = scanner.next();
        File file = new File(name + ".txt");
        double sum = 0;
        int n = 0;
        try{
            Reader reader = new FileReader(file);
            BufferedReader bufferedReader = new BufferedReader(reader);
            String str = null;
            String[] strs = null;
            str = bufferedReader.readLine();
            strs = str.split(" ");
            while (n < strs.length) {
                sum += Double.parseDouble(strs[n]);
                n++;
            }
            bufferedReader.close();
        }
        catch (IOException e){
            System.out.println(e.toString());
        }
        System.out.println("和:"+sum + " 平均值:"+ sum/(n + 1));
    }
}
